import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class test {
    public static void main(String[] args) {
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put("张无忌", "赵敏");
        hashMap.put("杨过", "小龙女");
        hashMap.put("郭靖", "黄蓉");
        hashMap.put("令狐冲", "任盈盈");
        Set<Map.Entry<String, String>> set = hashMap.entrySet();
        System.out.println(set);

        for (Map.Entry<String, String> stringEntry : set) {
            String key = stringEntry.getKey();
            String value = stringEntry.getValue();
            System.out.println(key+"="+value);
        }
    }
}
